<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<script language="javascript"> 
    <!-- 
    function fnGetTable( oEl ) 
    { 
        try{  
            while( null != oEl && oEl.tagName!="TABLE" ) 
            { 
                oEl = oEl.parentElement; 
            } 
            return oEl; 
        } 
        catch(e) 
        { 
            return null; 
        } 
    } 
    function pos() 
    { 
        try{ 
        oElement = document.elementFromPoint(event.x,event.y); 
        oElement = fnGetTable(oElement); 
        if(oElement.tagName=="TABLE") 
            alert("当前位置"+oElement.id); 
        } 
        catch(e) 
        {} 
    } 
    // --> 
</script> 
<BODY onmousemove="pos()"> 
<table border="1" cellpadding="" cellspacing="" width="" id="table1"> 
<tr> 
    <td>table1</td> 
</tr> 
</table> 
<table border="1" cellpadding="" cellspacing="" width="" id="table2"> 
<tr> 
    <td>table2</td> 
</tr> 
</table> 
<table border="1" cellpadding="" cellspacing="" width="" id="table3"> 
<tr> 
    <td>table3</td> 
</tr> 
</table> 
<table border="1" cellpadding="" cellspacing="" width="" id="table4"> 
<tr> 
    <td>table4</td> 
</tr> 
</table> 
<table border="1" cellpadding="" cellspacing="" width="" id="table5"> 
<tr> 
    <td>table5</td> 
</tr> 
</table> 
<table border="1" cellpadding="" cellspacing="" width="" id="table6"> 
<tr> 
    <td>table6</td> 
</tr> 
</table>
